package com.meitianhui.convenitenbuy.module.order.di;

import android.app.Activity;

import com.meitianhui.convenitenbuy.di.PerActivity;
import com.meitianhui.convenitenbuy.module.order.presenter.BPPOrderPresenter;
import com.meitianhui.convenitenbuy.module.order.presenter.EdinburghTypeOrderPresenter;
import com.meitianhui.convenitenbuy.module.order.presenter.FightGroupOderDetailPresenter;
import com.meitianhui.convenitenbuy.module.order.presenter.OrderPayPresenter;
import com.meitianhui.convenitenbuy.module.order.ui.activity.FightGroupOrderDetailActivity;
import com.meitianhui.convenitenbuy.module.order.ui.activity.OrderPayActivity;
import com.meitianhui.convenitenbuy.module.order.ui.fragment.BPPOrderFragment;
import com.meitianhui.convenitenbuy.module.order.ui.fragment.BrandOrderFragment;
import com.meitianhui.convenitenbuy.module.order.ui.fragment.EdinburghOrderTypeFragment;
import com.meitianhui.convenitenbuy.module.order.ui.fragment.FightGroupOrderFragment;
import com.meitianhui.convenitenbuy.module.order.ui.fragment.HomeServiceOrderFragment;
import com.meitianhui.convenitenbuy.module.order.ui.fragment.HuiGuoOrderTypeFragment;
import com.meitianhui.convenitenbuy.module.order.ui.fragment.OwnSaleOrderTypeFragment;

import dagger.Module;
import dagger.Provides;

@Module
public class OrderModule {
    private EdinburghTypeOrderPresenter edinburghTypeOrderPresenter;
    private OrderPayPresenter orderPayPresenter;
    private FightGroupOderDetailPresenter fightGroupOderDetailPresenter;
    private BPPOrderPresenter bppOrderPresenter;
    private Activity mActivity;

    public OrderModule(Activity activity) {
        this.mActivity = activity;
    }

    @Provides
    @PerActivity
    public Activity provideActivity() {
        return mActivity;
    }


    public OrderModule(EdinburghOrderTypeFragment activity) {
        edinburghTypeOrderPresenter = new EdinburghTypeOrderPresenter(activity, activity);
    }

    @Provides
    EdinburghTypeOrderPresenter provideEdinburghOrder() {
        return edinburghTypeOrderPresenter;
    }

    public OrderModule(FightGroupOrderFragment activity) {
        edinburghTypeOrderPresenter = new EdinburghTypeOrderPresenter(activity, activity);
    }

    public OrderModule(BrandOrderFragment activity) {
        edinburghTypeOrderPresenter = new EdinburghTypeOrderPresenter(activity, activity);
    }

    public OrderModule(HomeServiceOrderFragment activity) {
        edinburghTypeOrderPresenter = new EdinburghTypeOrderPresenter(activity, activity);
    }

    public OrderModule(HuiGuoOrderTypeFragment activity) {
        edinburghTypeOrderPresenter = new EdinburghTypeOrderPresenter(activity, activity);
    }

    public OrderModule(BPPOrderFragment activity) {
        bppOrderPresenter = new BPPOrderPresenter(activity, activity);
    }

    @Provides
    BPPOrderPresenter provideBPPOrderPresenter(){
        return bppOrderPresenter;
    }

    public OrderModule(OwnSaleOrderTypeFragment activity) {
        edinburghTypeOrderPresenter = new EdinburghTypeOrderPresenter(activity, activity);
    }

    public OrderModule(OrderPayActivity activity) {
        orderPayPresenter = new OrderPayPresenter(activity, activity);
    }

    @Provides
    OrderPayPresenter provideOrderPay() {
        return orderPayPresenter;
    }

    public OrderModule(FightGroupOrderDetailActivity activity) {
        fightGroupOderDetailPresenter = new FightGroupOderDetailPresenter(activity, activity);
    }

    @Provides
    FightGroupOderDetailPresenter provideFightGroupOderDetail() {
        return fightGroupOderDetailPresenter;
    }
}
